package com.bes.opslink.aiops.server.entity.demo;

import com.bes.opslink.aiops.server.api.dto.DemoDTO;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

@Mapper
public interface DemoTransfer {
    DemoTransfer transfer = Mappers.getMapper(DemoTransfer.class);

    /**
     * PO转DTO
     *
     * @param demo po对象
     * @return dto对象
     */
    @Mappings({})
    DemoDTO toDemoDTO(Demo demo);

    /**
     * DTO转PO
     *
     * @param demoDTO dto对象
     * @return po对象
     */
    @InheritConfiguration
    Demo toDemo(DemoDTO demoDTO);
}
